import request from "@/utils/request";

// 查询药历小结信息列表
export function listMedicationSummary(query) {
  return request({
    url: "/workstation/medicationSummary/list",
    method: "get",
    params: query,
  });
}

// 查询药历小结信息详细
export function getMedicationSummary(id) {
  return request({
    url: "/workstation/medicationSummary/" + id,
    method: "get",
  });
}

// 完成并存档药历
export function statemedicalRecordNo(medicalRecordNo) {
  return request({
    url: "/workstation/medicationSummary/state/" + medicalRecordNo,
    method: "get",
  });
}

// 新增药历小结信息
export function addMedicationSummary(data) {
  return request({
    url: "/workstation/medicationSummary",
    method: "post",
    data: data,
  });
}

// 修改药历小结信息
export function updateMedicationSummary(data) {
  return request({
    url: "/workstation/medicationSummary",
    method: "put",
    data: data,
  });
}

// 删除药历小结信息
export function delMedicationSummary(id) {
  return request({
    url: "/workstation/medicationSummary/" + id,
    method: "delete",
  });
}

// 查询药历小结信息详细
export function medicalRecordList(query) {
  return request({
    url: "/workstation/medicalRecord/list",
    method: "get",
    params: query,
  });
}
